extends ../../layout/layout

block content
  .content-wrapper
    .search-condition
      form#form-search
        .form-inline
          .form-group
            label.marginR10 订单编号&emsp;
              input.form-control.form-width120(name="orderNo" placeholder="请输入订单编号")
          .form-group
            label.marginR10 下单人&emsp;
              input.form-control.form-width120(name="placingUserPhone" placeholder="请输入下单人")
          .form-group
            label.marginR10 车牌号&emsp;
              input.form-control.form-width120(name="autoNo" placeholder="请输入车牌号")
          .form-group
            label.marginR10 司机电话&emsp;
              input.form-control.form-width120(name="driverPhone" placeholder="请输入司机电话")
          //- .form-group
          //-   label.marginR10 创建时间
          //-     input.form-control.form-width200#created-time(placeholder="请选择时间范围" readonly)
          //-     input(type="hidden" name="createTimeBegin")
          //-     input(type="hidden" name="createTimeEnd")
        .form-inline.marginT10
          .form-group
            label.marginR10 城&emsp;市&emsp;
              select.form-control.form-width100(name="cityId")
          .form-group
            label.marginR10 服务类型&emsp;
              select.form-control.form-width100(name="orderType")
                option(value="") 请选择
                option(value="1") 接机
                option(value="2") 送机
                option(value="3") 接站
                option(value="4") 送站
                option(value="5") 预约车
          .form-group
            label.marginR10 车辆类型&emsp;
              select.form-control.form-width100(name="bookModel")
                option(value="") 请选择
                option(value="1") 舒适型
                option(value="2") 商务7座
                option(value="3") 豪华轿车
          //-.form-group
            label.marginR10 订单状态&emsp;
              select.form-control.form-width100(name="")
                option(value="") 请选择
          .form-group
            label.marginR10 支付类型&emsp;
              select.form-control.form-width100(name="payType")
                option(value="") 请选择
                option(value="1") 乘客自付
                option(value="2") 司机代付
          .form-group
            label.marginR10 订单来源&emsp;
              select.form-control.form-width100(name="orderChannel")
                option(value="") 请选择
                option(value="1") Andriod
                option(value="2") IOS
                option(value="3") 小程序
                option(value="4") 管家订单
                option(value="5") 400订单
    .com-op.marginT10
      button.btn.btn-default.marginR10#search-btn(type="button")
        i.fa.fa-search
        span 搜索
      button.btn.btn-default.marginR10#btn-add(type="button")
        i.fa.fa-plus
        span 新建
      button.btn.btn-default.marginR10#btn-cancel(type="button")
        //- i.fa.fa-？
        span 取消
      button.btn.btn-default.marginR10#btn-redispatch(type="button")
        //- i.fa.fa-cog
        span 改派
      //-button.btn.btn-default.marginR10(type="button")
        //- i.fa.fa-?
        span 导出

    .content-body.marginT10#table-box
      table.table#table-order
      #pager-order

block vendor_css
  link(rel='stylesheet', type="text/css", href="../../vendor/jqGrid/css/ui.jqgrid-bootstrap.css")

block vendor_js
  script(src="../../vendor/jqGrid/js/jquery.jqGrid.js")
  script(src="../../vendor/jqGrid/js/i18n/grid.locale-cn.js")
  script(src="../../vendor/laydate/laydate.js")
  script(src="../../vendor/jquery-validation-1.17.0/jquery.validate.min.js")
  script(src="../../vendor/jquery-validation-1.17.0/jquery.validate.extend.js")

  script(src="//webapi.amap.com/maps?v=1.4.2&key=cdd6b8f058b5bd6b8a5e395cba02a043&plugin=AMap.ToolBar,AMap.Autocomplete")
  script(src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11")

block self_js
  script(src="../../js/module/order/ongoing.js")


block layer

  //- 新建
  .layer-box#layer-order-add
    form.mw1200.padding20#form-order-add(name="form-order-add", autocomplete="off")
      +orderForm-add

  //- 查看
  .layer-box#layer-order-view
    form#form-order-view
      +orderForm-view

  //- 改派
  .layer-box#layer-order-redispatch
    .d-header
      | 订单编号ID：
      span.marginR10(data-clientId) 5955448415
      | 城市：
      span.marginR10(data-city) 长沙
      | 服务类型：
      span.marginR10(data-serveType) 接机
      | 车辆类型：
      span.marginR10(data-carType) 公务轿车

    .d-content.padding20
      .row.form-row.form-row-sm
        .col-xs-4
          .form-text 城市：
          .form-container
            select.form-control.form-width100(name="cityId")
                option(value="") 请选择
                option(value="1") 长沙
                option(value="2") 武汉
                option(value="3") 贵阳
                option(value="4") 广州
                option(value="5") 深圳
        .col-xs-4
          .form-text 车辆类型：
          .form-container
            select.form-control.form-width100(name="bookModel")
                option(value="") 请选择
                option(value="1") 舒适型
                option(value="2") 商务7座
                option(value="3") 豪华轿车
        .col-xs-4
          .form-text 司机电话：
          .form-container
            input.form-control(name="driverPhone", disabled)
      .row.form-row.form-row-sm
        .col-xs-12
          .form-text 司机状态：
          .form-container.form-inline
            label
              input(type="checkbox", name="state", value="0", disabled,checked)
              | 离线
            label
              input(type="checkbox", name="state", value="1", disabled,checked)
              | 上线
            label
              input(type="checkbox", name="state", value="2", disabled,checked)
              | 待命中
            label
              input(type="checkbox", name="state", value="3", disabled,checked)
              | 入栈中
            label
              input(type="checkbox", name="state", value="4", disabled,checked)
              | 入栈
            label
              input(type="checkbox", name="state", value="5", disabled,checked)
              | 服务中
            button.btn.btn-default#driver-search(type="button")
              i.fa.fa-search
              span 搜索

      table.table#table-order-redispatch
      #pager-order-redispatch

    .d-bottom
      | 该订单：
      span(data-orderTime) 2017-11-22 20:20
      | 被
      span(data-operator) 张三丰
      span.submit 确认改派

//- 新增订单表单
mixin orderForm-add
  .row.form-row.form-row-sm
    .col-xs-4
      .form-text 用车目的：
      .form-container
        select.form-control(name="model")
          option(value="") 请选择
          option(value="1") 普通用车
          option(value="2") 会务用车
    .col-xs-4
      .form-text 乘车人电话
      .form-container
        input.form-control(name="passenger_phone" placeholder="请输入乘车人电话")
    .col-xs-4
      .form-text 用车时间：
      .form-container
        input.form-control#plan_depart_time(name="plan_depart_time" placeholder="请选择用车时间")
  .row.form-row.form-row-sm
    .col-xs-4
      .form-text 出发城市：
      .form-container
        select.form-control#add-cityId(name="cityId")
    .col-xs-4
      .form-text 服务类型：
      .form-container
        select.form-control#add-order_type(name="order_type")
          option(value="") 请选择
          option(value="1") 立即接机
          option(value="2") 立即接站
    .col-xs-4
      .form-text 车辆类型：
      .form-container
        select.form-control#add-book_model(name="book_model")
          option(value="") 请选择
          option(value="1") 舒适型
          option(value="2") 商务7座
          option(value="3") 豪华轿车
  .row.form-row.form-row-sm
    .col-xs-4
      .form-text 上车地点：
      .form-container
        select.form-control#initAddress(name="initAddress" disabled)
          option(value="") 请选择
  .row.form-row.form-row-smdisabled
    .col-xs-12
      .form-text 下车地点：
      .form-container.form-inline
        input.form-control.form-width300.marginR10(name="plan_dest", placeholder="目的地详细地址")
        | 经度：
        input.form-control.form-width120.marginR10(name="plan_dest_lng", placeholder="目的地经度")
        | 纬度：
        input.form-control.form-width120.marginR10(name="plan_dest_lat", placeholder="目的地纬度")
        button.btn.btn-default.marginR10#btn-pick-address(type="button" disabled)
          //- i.fa.fa-plus
          span 选择地址
  .row.form-row.form-row-sm
    .col-xs-12
      .form-text
      .form-container.marginT10
        button.btn.btn-default.marginR10#btn-calc-price(type="button")
          //- i.fa.fa-plus
          span 计算预估价
        span#calc-info

//- 订单详情表单
mixin orderForm-view
  .d-header
      | 创建时间：
      span(data-createTime)
      | &emsp;订单编号：
      span(data-orderNo)
      //-| 订单状态：
      //-span(data-serveType) 改派中

  .d-title
    span 基础信息

  .d-content.padding20
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 下单人：
        .form-container
          input.form-control(name="placingUserPhone", disabled)
      .col-xs-4
        .form-text 上车地点：
        .form-container
          input.form-control(name="planOrig", disabled)
      .col-xs-4
        .form-text 下车地点：
        .form-container
          input.form-control(name="planDest", disabled)
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 服务类型：
        .form-container
          select.form-control(name="orderType", disabled)
      .col-xs-4
        .form-text 用车类型：
        .form-container
          select.form-control(name="bookModel", disabled)
      .col-xs-4
        .form-text 预估价：
        .form-container
          input.form-control(name="planPrice", disabled)
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 实付：
        .form-container
          input.form-control(name="factPrice", disabled)
      .col-xs-4
        .form-text 支付时间：
        .form-container
          input.form-control(name="paiedTime", disabled)
      .col-xs-4
        .form-text 支付渠道：
        .form-container
          select.form-control(name="payChannel", disabled)
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 支付类型：
        .form-container
          select.form-control(name="payType", disabled)
      .col-xs-4
        .form-text 订单来源：
        .form-container
          select.form-control(name="orderChannel", disabled)
      //-.col-xs-4
        .form-text 行车轨迹：
        .form-container
          img#img-card-code(alt="", src="", width="50", height="25")
          span 点击放大图片
  .d-title
    span 接派单信息

  .d-content.padding20
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 车牌：
        .form-container
          input.form-control(name="autoNo", disabled)
      .col-xs-4
        .form-text 司机ID：
        .form-container
          input.form-control(name="driverId", disabled)
      .col-xs-4
        .form-text 司机姓名：
        .form-container
          input.form-control(name="driverName", disabled)
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 司机电话：
        .form-container
          input.form-control(name="driverPhone", disabled)
      //-.col-xs-3
        .form-text 派单详情：
        .form-container
          input.form-control(name="", disabled)
      .col-xs-4
        .form-text 到达上车地：
        .form-container
          input.form-control(name="depTime", disabled)
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 开始行程时间：
        .form-container
          input.form-control(name="depTime", disabled)
      .col-xs-4
        .form-text 结束行程时间：
        .form-container
          input.form-control(name="destTime", disabled)

    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 上车前里程：
        .form-container
          input.form-control(name="startMile", disabled)
      .col-xs-4
        .form-text 下车后里程：
        .form-container
          input.form-control(name="endMile", disabled)
    //-.row.form-row.sm
      .col-xs-6
        .form-text 操作记录
        .form-container
          input.form-control(name="", disabled)

  .d-bottom
    | 操作记录：
    span(data-operator) 该订单无人为操作
